Reported in thread for Bug#4375.
authorNick Roberts <nickrob@snap.net.nz>
Thu, 10 Sep 2009 03:03:27 +0000 (03:03 +0000)
committerNick Roberts <nickrob@snap.net.nz>
Thu, 10 Sep 2009 03:03:27 +0000 (03:03 +0000)
* progmodes/gud.el (gud-tooltip-print-command): Use MI command
"-data-evaluate-expression" instead of print.
* progmodes/gdb-mi.el (gdb-tooltip-print-1): Ditto.
(gdb-tooltip-print): Parse output from above MI command.

lisp/progmodes/gud.el

index 0d3679575d62bf00501c5ec0123d868e6cbf94f3..34d7cd7eaefefc8e5a909b713ff7c975c9a16e0c 100644 (file)
@@ -3411,7 +3411,8 @@ With arg, dereference expr if ARG is positive, otherwise do not derereference."
 (defun gud-tooltip-print-command (expr)
   "Return a suitable command to print the expression EXPR."
   (case gud-minor-mode
-       ((dbx gdbmi) (concat "print " expr))
+       (gdbmi (concat "-data-evaluate-expression " expr))
+       (dbx (concat "print " expr))
        ((xdb pdb) (concat "p " expr))
        (sdb (concat expr "/"))))